package com.alignet.gn.hibernate;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.OneToMany;

/**
 * AbstractTgnRole entity provides the base persistence definition of the
 * TgnRole entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractTgnRole implements java.io.Serializable {

    // Fields

    private Integer inIdrole;
    private String vcTypeentity;
    private Integer inIdentity;
    private String vcName;
    private String vcGroupidaction;
    private String vcEditable;
    private String chState;
    private Integer inIduserreg;
    private Timestamp dtRegistry;
    private Integer inIduserupd;
    private Timestamp dtUpdate;
    private Set<TgnUser> tgnUsers = new HashSet<TgnUser>(0);

    // Constructors

    /** default constructor */
    public AbstractTgnRole() {
    }

    /** minimal constructor */
    public AbstractTgnRole(Integer inIdrole,
	    String chState, Timestamp dtRegistry, Timestamp dtUpdate) {
	this.inIdrole = inIdrole;
	this.chState = chState;
	this.dtRegistry = dtRegistry;
	this.dtUpdate = dtUpdate;
    }

    /** full constructor */
    public AbstractTgnRole(Integer inIdrole,
	    String vcTypeentity, Integer inIdentity, String vcName,
	    String vcGroupidaction, String vcEditable, String chState,
	    Integer inIduserreg, Timestamp dtRegistry, Integer inIduserupd,
	    Timestamp dtUpdate, Set<TgnUser> tgnUsers) {
	this.inIdrole = inIdrole;
	this.vcTypeentity = vcTypeentity;
	this.inIdentity = inIdentity;
	this.vcName = vcName;
	this.vcGroupidaction = vcGroupidaction;
	this.vcEditable = vcEditable;
	this.chState = chState;
	this.inIduserreg = inIduserreg;
	this.dtRegistry = dtRegistry;
	this.inIduserupd = inIduserupd;
	this.dtUpdate = dtUpdate;
	this.tgnUsers = tgnUsers;
    }

    // Property accessors
    @Id
    @Column(name = "IN_IDROLE", unique = true, nullable = false)
    public Integer getInIdrole() {
	return this.inIdrole;
    }

    public void setInIdrole(Integer inIdrole) {
	this.inIdrole = inIdrole;
    }

  

    @Column(name = "VC_TYPEENTITY", length = 1)
    public String getVcTypeentity() {
	return this.vcTypeentity;
    }

    public void setVcTypeentity(String vcTypeentity) {
	this.vcTypeentity = vcTypeentity;
    }

    @Column(name = "IN_IDENTITY")
    public Integer getInIdentity() {
	return this.inIdentity;
    }

    public void setInIdentity(Integer inIdentity) {
	this.inIdentity = inIdentity;
    }

    @Column(name = "VC_NAME", length = 30)
    public String getVcName() {
	return this.vcName;
    }

    public void setVcName(String vcName) {
	this.vcName = vcName;
    }

    @Column(name = "VC_GROUPIDACTION", length = 100)
    public String getVcGroupidaction() {
	return this.vcGroupidaction;
    }

    public void setVcGroupidaction(String vcGroupidaction) {
	this.vcGroupidaction = vcGroupidaction;
    }

    @Column(name = "VC_EDITABLE", length = 1)
    public String getVcEditable() {
	return this.vcEditable;
    }

    public void setVcEditable(String vcEditable) {
	this.vcEditable = vcEditable;
    }

    @Column(name = "CH_STATE", nullable = false, length = 1)
    public String getChState() {
	return this.chState;
    }

    public void setChState(String chState) {
	this.chState = chState;
    }

    @Column(name = "IN_IDUSERREG")
    public Integer getInIduserreg() {
	return this.inIduserreg;
    }

    public void setInIduserreg(Integer inIduserreg) {
	this.inIduserreg = inIduserreg;
    }

    @Column(name = "DT_REGISTRY", nullable = false, length = 26)
    public Timestamp getDtRegistry() {
	return this.dtRegistry;
    }

    public void setDtRegistry(Timestamp dtRegistry) {
	this.dtRegistry = dtRegistry;
    }

    @Column(name = "IN_IDUSERUPD")
    public Integer getInIduserupd() {
	return this.inIduserupd;
    }

    public void setInIduserupd(Integer inIduserupd) {
	this.inIduserupd = inIduserupd;
    }

    @Column(name = "DT_UPDATE", nullable = false, length = 26)
    public Timestamp getDtUpdate() {
	return this.dtUpdate;
    }

    public void setDtUpdate(Timestamp dtUpdate) {
	this.dtUpdate = dtUpdate;
    }

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tgnRole")
    public Set<TgnUser> getTgnUsers() {
	return this.tgnUsers;
    }

    public void setTgnUsers(Set<TgnUser> tgnUsers) {
	this.tgnUsers = tgnUsers;
    }

}